using System.ComponentModel.DataAnnotations;

namespace Server.Modeels
{
    public class LoginRequest
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(50, ErrorMessage = "用户名长度不能超过50个字符")]
        public string Username { get; set; } = string.Empty;

        [Required(ErrorMessage = "密码不能为空")]
        [StringLength(50, MinimumLength = 6, ErrorMessage = "密码长度必须在6到50个字符之间")]
        public string Password { get; set; } = string.Empty;
    }
}